package track
{
	/**
	 * 轨迹工厂
	 **/
	public class TrackFactory
	{
		public static var pathArr:Array;
		private static var _instance:TrackFactory;
		public function TrackFactory():void
		{
			pathArr = new Array();
		}
		
		public static function getInstance():TrackFactory{
			return _instance ||= new TrackFactory();
		}

		public static function makePath(typeId:uint, subTypeId:uint):Array{
			switch(typeId){
				case 0:
					pathArr = TrackLine.getInstance().make(subTypeId);
					break;
				case 1:
					pathArr = TrackC2C.getInstance().make(subTypeId);
					break;
				case 2:
					pathArr = TrackRect.getInstance().make(subTypeId);
					break;
				case 3:
					pathArr = TrackCircle.getInstance().make(subTypeId);
					break;
				case 4:
					pathArr = TrackEight.getInstance().make(subTypeId);
					break;
			}
			return pathArr;
		}
	}
}
